package leading;

import java.util.Arrays;

public class TestIndexOf {
	public static void main(String[] args) {
		/*		String  str = "12345677891234567780";
		//查找该字符在字符串中第一次出现的索引，没有返回-1
		int in = str.indexOf("123",2);
		int lin = str.lastIndexOf("123");
		int cin = str.indexOf(65);
		char a = 1 + 64;
		System.out.println(a);
		System.out.println(in);
		System.out.println(lin);*/
		String str = "a-b-c-d-e-f";
/*		String str1 = "abcefd";
		char[] char1 = str.toCharArray();
		char[] char2 = str.toCharArray();
		Arrays.sort(char1);
		Arrays.sort(char2);
		
		str = String.copyValueOf(char1);
		str1 = String.copyValueOf(char2);*/
		String[] arr = str.split("-",3);
		System.out.println("____________________"+arr.length);
		for(int i=0;i<arr.length;i++){
			System.out.println(arr[i]);
		}
		System.out.println("######"+str.substring(1));
		//System.out.println(str+"```````````````"+str1);
	}
}
